package easy;

public class Solution_1935 {

    public int canBeTypedWords(String text, String brokenLetters) {
        boolean[] flags = new boolean[26];
        for (int i = 0; i < brokenLetters.length(); i++) {
            flags[brokenLetters.charAt(i) - 'a'] = true;
        }
        String[] strings = text.split(" ");
        int count = 0;
        for (String string : strings) {
            boolean flag = true;
            for (int i = 0; i < string.length(); i++) {
                if (flags[string.charAt(i) - 'a']) {
                    flag = false;
                }
            }
            if (flag) {
                count++;
            }
        }
        return count;
    }
}
